package com.learning.regex;

/**
 * Created by xieyichao on 2017/5/13.
 */

public class Pattern {

    private CharSequence mRegular;
    private CharSequence mMatcherStr;

    private Pattern(CharSequence regular){
        mRegular = regular;
    }

    public static Pattern compile(CharSequence regular){
        return new Pattern(regular);
    }

    public Matcher matcher(CharSequence matcherStr){
        mMatcherStr = matcherStr;
        return new Matcher(this);
    }

    public CharSequence getRegular(){
        return mRegular;
    }

    public CharSequence getMatcherStr(){
        return mMatcherStr;
    }

}
